home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / umich / falcon / programm.ing / falclib.lzh / EXAMPLE / GEMSTUF3.S < prev    next >
Text File  |  1994-08-17  |  1KB  |  58 lines

  1. *********************************************************
  2. *                            *
  3. * A very short window demonstration            *
  4. *                            *
  5. *********************************************************
  6.  
  7.         include    releasem.s    release unused memory
  8.         include    getpar.s    find where the parameters sent to the program are
  9.         move.l    a0,parbuf    save the address
  10.  
  11.         bra    main
  12.         include    gemmacro.i    this one is supplied with devpac
  13.         include    shrtones.s
  14.         include    window.s
  15.         include    winevent.s
  16.         
  17.  
  18. wtype        equ    %01011        info, move, full, close and name
  19. windowname    dc.b    'hello world',0
  20.  
  21. main        move    #32,xstart    window start position
  22.         move    #50,ystart
  23.         move    #380,xwidth    window size
  24.         move    #150,ywidth
  25.         bsr    @createwindow
  26.         
  27.         lea    rsrc,a0
  28.         bra    @dowindowevents    ;this routine will take care of all the common events
  29.  
  30. buttonevent    cmp    #1,d0        was my button pressed?
  31.         beq    button1        yes!
  32.         rts
  33. button1        form_alert alertbutton,#alerttext
  34.         rts
  35.         
  36. closeevent    bsr    @exitwindow
  37.         bra    @quit
  38.  
  39.  
  40.  
  41. rsrc        dc.w    -1,1,1,20,0,0,4,1,0,0,380,150
  42.         dc.w    0,-1,-1,26,1,0
  43.         dc.l    buttontext
  44.         dc.w    50,50,100,16
  45.  
  46. alertbutton    dc.w    1
  47. alerttext    dc.b    '[2][You have not saved anything|are you sure you want to quit?][    Yes    ]',0
  48. buttontext    dc.b    'a button',0
  49.  
  50.         include    aeslib.s    supplied with devpac
  51.         include    vdilib.s    supplied with devpac
  52.         
  53.         section bss
  54.         
  55. parbuf        ds.l    1
  56.  
  57.  
  58.